package com.scf.preloanmanage.service.impl;

import com.scf.preloanmanage.entity.BorrowDemand;
import com.scf.preloanmanage.mapper.BorrowDemandMapper;
import com.scf.preloanmanage.service.BorrowDemandService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author author
 * @create 2021-11-17-10:29
 */
@Service
public class BorrowDemandServiceImpl implements BorrowDemandService {

    @Resource
    private BorrowDemandMapper borrowDemandMapper;

    @Override
    public BorrowDemand getById(int id) {
        BorrowDemand borrowDemand = borrowDemandMapper.selectById(id);
        return borrowDemand;
    }

    @Override
    public boolean updateById(int bmid, String opinion) {
        int i = borrowDemandMapper.updateById(bmid, opinion);
        if(i==1){
            return true;
        }
        return false;
    }
}
